# 作者: YYJ
# 2025年07月13日15时15分52秒
# 2486249622@qq.com
import time

import requests
from gevent import monkey
import gevent

monkey.patch_all()

def my_downLoad(url):
    print('正在下载%s' % url)
    response = requests.get(url)
    data = response.text
    print('%d bytes received from %s' % (len(data), url))

start = time.time()
gevent.joinall([
    gevent.spawn(my_downLoad, 'https://www.baidu.com'),
    gevent.spawn(my_downLoad, 'https://www.cskaoyan.com'),
    gevent.spawn(my_downLoad, 'https://www.lgwenda.com')
])
print('总耗时: %.2f' % (time.time() - start))